home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 06 - 1990 / 06.07 Jul 90 / Commando Programming ƒ / NewTempFile.install next >
Encoding:
Text File  |  1989-08-15  |  1.6 KB  |  52 lines  |  [TEXT/MPS ]

  1. #############################################################
  2. ###        File:  NewTempFile.install
  3. ###        Supporting facilities needed to use 
  4. ###        MPW Shell Script "NewTempFile".
  5.  
  6. ###        To install the NewTempFile script in your MPW system,
  7. ###            1.    Place the script file "NewTempFile" into
  8. ###                any directory in the {Commands} search path.
  9. ###            2.    Place the shell script fragments below into
  10. ###                the standard MPW script files as indicated.
  11.  
  12. ##############################################################
  13. ###        Place the following lines into the
  14. ###        "Startup" or one of the "UserStartup" files.
  15.  
  16. #    {TMP} - Directory that contains temporary files.
  17.             Set TMP "{MPW}tmp:"
  18.             Export TMP
  19.  
  20.  
  21. ##############################################################
  22. ###        Place the following lines into the
  23. ###        "Quit" script file.
  24.  
  25. ###    Empty the scratch directory
  26.         Set OldExit {Exit}
  27.         Set Exit 0
  28.         # Don't want error messages when no windows open.
  29.         Close -n `Files -f "{TMP}" `≥≥Dev:Null
  30.         Set Exit {OldExit}
  31.         Delete -y -i "{TMP}"
  32.         NewFolder "{TMP}"
  33.  
  34. ##############################################################
  35. ###        Place the following lines into an 
  36. ###        appropriate file for the "Help" tool.
  37.  
  38. -
  39. NewTempFile [-t] [-e | -q] [basename]
  40.       Create a temporary scratch file. Shell variable {TMP},
  41.       defined in Startup script, is the directory for new file. 
  42.     -t    Opens file as target window (default active window).
  43.     -e  Echo the new file name without quoting.  
  44.     -q    Echo the new file name, quoting names with spaces and 
  45.         special characters.  
  46.     Can't use -q and -e together
  47. -
  48.  
  49. ###        End File NewTempFile.install
  50. #################################################
  51.  
  52.